package cn.zhaozhiqi.service.impl;

import cn.zhaozhiqi.mapper.CustomerSummaryMapper;
import cn.zhaozhiqi.pojo.domain.CustomerSummary;
import cn.zhaozhiqi.service.ICustomerSummaryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.math.BigDecimal;
import org.springframework.stereotype.Service;


/**
 * <p>
 * 乘客数据汇总 服务实现类
 * </p>
 *
 * @author zhaozhiqi
 * @since 2024-12-21
 */
@Service
public class CustomerSummaryServiceImpl extends ServiceImpl<CustomerSummaryMapper, CustomerSummary> implements ICustomerSummaryService {

    @Override
    public void create(long customerId) {
        CustomerSummary customerSummary = new CustomerSummary();
        customerSummary.setId(customerId);
        customerSummary.setTotalOrders(0);
        customerSummary.setTotalFine(BigDecimal.ZERO);
        customerSummary.setVoucherNumbers(0);
        customerSummary.setCancelOrders(0);
        super.save(customerSummary);

    }
}
